package com.xhu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data //get、set、toString等方法
@AllArgsConstructor//全参构造函数
@NoArgsConstructor//无参构造函数
@TableName("user")//指定实体类表名
public class User {
    @TableId(value = "user_id",type = IdType.AUTO)
    private Integer userId;
    @TableField("username")//指定映射
    private String username;
    @TableField("password")
    private String password;
    @TableField(exist = false)//不属于表内字段
    private Role role;
}
